//该文件专门用于创建整个应用的的路由器
import Vuerouter from 'vue-router'

//引入子组件。
import Vue from 'vue'
import Home from '../components/Home'
import Order from '../components/Order'
import Species from '../components/Species'
import  My from '../components/My'
// 创建一个路由器
//2：应用插件
Vue.use (Vuerouter)
const router = new Vuerouter({
  //制定路由规则
  routes: [
    {
      path: '/home',
      component:Home
    },
    {
      path: '/order',
      component:Order
    },
    {
      path: '/species',
      component:Species
    },
    {
      path: '/my',
      component:My
      
    }
  ]
})

// 暴露出去路由器
export default router